package com.lwq.im.chartdemo.bean;

import com.lwq.im.chartdemo.constants.Constants;
import lombok.Data;

import java.io.Serializable;

@Data
public class Ping implements IMessage, Serializable {

    private static final long serialVersionUID = 1L;


    private final String ping = "ping";
    private static final Ping instance = new Ping();


    public static Ping getInstance(){
        return instance;
    }

    @Override
    public byte[] getBody() {
        return ping.getBytes();
    }

    @Override
    public byte getMsgType() {
        return Constants.MsgType.HART_BEAT_TYPE;
    }
}
